import { useNavigate } from "react-router-dom"

export default function UseLogCustomPath() {
  const navigate = useNavigate()
  return (
    <div>
      <h4>每个组件创建/销毁时都打印被创建/销毁了</h4>
      <button onClick={() => navigate("/Home")}>Home</button>
      <button onClick={() => navigate("/Product")}>Product</button>
    </div>
  )
}
